package com.naiterui.ehp.bp.security.service;

import com.naiterui.ehp.bp.security.exception.BadRequestException;
import com.naiterui.ehp.bp.security.vo.FaceIdVO;

/**
 * 检查权限是否存在
 *
 * @author 王泽浩
 * @date 2020/7/13 1:45 下午
 * @since 1.0.0
 */
@SuppressWarnings("unused")
public interface IPermissionService {

    /**
     * service实现类使用次名
     */
    String SERVICE_NAME = "p";

    Boolean check(String... permissions);

    String sendSmsCode(String username) throws BadRequestException;

    void verifySmsCode(String username, String smsCode);

    /**
     * 默认忽略人脸识别校验
     *
     * @param username /
     * @return
     */
    default FaceIdVO verifyFace(String username) {
        return FaceIdVO.builder().checkResult(true).build();
    }
}
